const enum Directions {
  Up = 1,
  Down,
  Left,
  Right,
}

const enum Directions1 {
  Up,
  Down,
  Left,
  Right,
}

console.log(Directions1.Up);

// 设置字符串
enum Directions2 {
  Up = "UP",
  Down = "DOWN",
  Left = "LEFT",
  Right = "RIGHT",
}
const value = "UP";
if (value === Directions2.Up) {
  console.log("go up!");
}
